package com.turbo.cloud.core.security.config;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Objects;

/**
 * 网关白名单配置
 * @author zhangluning
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Component
@ConfigurationProperties(prefix="security", ignoreInvalidFields = true)
public class IgnoreUrlsConfig {
    /**
     * 忽略的接口
     * */
    private String[] ignoreUrls;

    public String[] getIgnoreUrls() {
        return Objects.isNull(ignoreUrls) ? new String[]{} : ignoreUrls;
    }
}
